<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>DOM元素操作</title>
    <style type="text/css">
    .head{
        display: inline-block;
        width: 140px;
        padding: 15px;
        background-color: #00f;
        color: #fff;
    }
    </style>
    <script type="text/javascript" src="JS/jquery-3.3.1.js"></script>
    <script>
    $(function(){
        var _str=$("#panel")
        $("#btn1").click(function(){
            _str.prepend("<span>我在：</span>")
        });

        $("#btn2").click(function(){
            _str.append("<span>进行前端技术开发学习</span>")
        });

        $("#btn3").click(function(){
            _str.empty();
        });
    });
    </script>
</head>
<body>
    <div id="panel">
        <span class="head">丁丁编程技术</span>
    </div>
    <div style="margin:10px">
        <button id="btn1">在head之前插入</button>
        <button id="btn2">在head之后插入</button>
        <button id="btn3">移除head元素</button>
    </div>
</body>
</html>